- if @documents.present?
  .posts
    - @documents.each do |doc|
      - link = link_to_document(doc)
      .box.light-gray
        .post{:style => "margin-bottom: 0px;"}
          %h3{:style => "border-bottom: 1px solid #CCC"}
            = link_to doc.title, link
          %p.meta
            %span.date= l doc.created_at
            %span.posted
              опубликовал(а)
              = link_to doc.user.full_name, "#"

          .tags{:style => "text-align: right;"}
            - links_for_tags(doc.tags) do |tag|
              = tag
          .actions{:style => "padding: 3px;"}
            = link_to t('read_more'), link, :class => "btn primary large"
- else
  No documents found

- content_for :sidebar do
  %ul
    %li
      .box.light-gray
        %h2= t('tags')
        .tags
          - tag_cloud(@tags) do |tag|
            = tag
